package com.opages.cloud.example.api;

import com.opages.cloud.example.model.CloudExampleDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author daizhong.liu
 * @create 2020-06-07 19:02
 **/
@FeignClient(name="cloud-example")
@RequestMapping("/cloud/example")
public interface CloudExampleApi {
    @PostMapping(path="/find")
    @ResponseBody
    public List<CloudExampleDto> examples(String name);
    @PostMapping(path = "/save")
    public void save(CloudExampleDto example);
}
